/*
*
*  name: detailMotheds
*  author: tonney
*  date: 2020/03/30 11:15
*
*/
$(function(){
    scrollNav();
    //监听浏览器宽度的改变
    /*
    window.onresize = function(){
        resourceChange();
    };
    */
});
var scrollNav = function(){
    var docWidth = document.body.clientWidth;
    if(docWidth > 768){
        if($("#fullPitch").length>0){
            var headGroup = $('#fullPitch').height();
            $(window).bind("scroll resize", function() {
            	if ($(window).scrollTop() > headGroup) {
            		$('#articleNavGrid').removeClass('white').addClass('fixed');
            	}else{
            		$('#articleNavGrid').removeClass('fixed').addClass('white');
            	}
            });
        }
    }else{
        $('#articleNavGrid').removeClass('whiteNav');
    }
};


// 监听浏览器 - 适配 资源 swiper
var resourceChange = function(){
    var docWidth = document.body.clientWidth;
    if(docWidth <= 768){
        // 移动端
        $('#articleNavGrid').removeClass('whiteNav');
        
    }else{
        // pc端
        $('#articleNavGrid').addClass('whiteNav');
        scrollNav();
    }
    
};

function check_comm(obj){
    var content = obj.content.value.trim();
	if(content === ''){
	    layer.msg('哎呀，你好像忘记写评论了？');
		return false;
	}
}
